<?php 
include_once(''.P.'/public/header.html');
?>

<script>
function initbody(){
		
}
function save(o1){
	var da = js.getformdata();
	if(!da.name){js.setmsg('名字不能为空');return;}
	js.setmsg('保存中...');
	o1.disabled=true;
	js.ajax({
		type:'post',
		url:'?m=dept&d=manage&cnum='+cnum+'&a=savecheck',
		data:da,
		success:function(res){
			if(res=='ok'){
				js.back();
			}else{
				js.setmsg(res);
				o1.disabled=false;
			}
		}
	});
}
</script>
</head>

<body>

<?php 
include_once(''.P.'/public/top_manage.html');
?>

<div align="center">

<div style="width:<?=$maxwidth?>;margin:20px 0px" align="left">
	<div style="color:#cccccc">
		<a href="?d=manage&cnum=<?=$cnum?>" class="zhu"><?=lang('manage.home')?></a> &gt;
		<a href="javascript:;" onclick="js.back()" class="zhu"><?=lang('manage.dept')?></a> &gt;
		<a href="" class="zhu">部门操作</a>
	</div>
	<div class="mainbody">
	
		<div style="padding:20px" align="center">
			
			<form name="myform">
			<input type="hidden" name="id" value="<?=$da['id']?>">
			<table width="500px">
			
			<tr>
				<td height="50" align="right"><font color=red>*</font>部门名称&nbsp;&nbsp;</td>
				<td><input style="width:250px" name="name" class="input" value="<?=$da['rs']['name']?>"></td>
			</tr>
			<tr>
				<td height="50" align="right">编号&nbsp;&nbsp;</td>
				<td><input style="width:250px" name="num" class="input" value="<?=$da['rs']['num']?>"></td>
			</tr>
			<tr>
				<td height="50" align="right">负责人&nbsp;&nbsp;</td>
				<td><input style="width:250px" name="headman" class="input" value="<?=$da['rs']['headman']?>"></td>
			</tr>
		
			<tr>
				<td height="50" align="right">上级ID&nbsp;&nbsp;</td>
				<td><input style="width:250px" readonly name="pid" class="input" value="<?=$da['rs']['pid']?>"></td>
			</tr>
			
			<tr>
				<td height="50" align="right">排序号&nbsp;&nbsp;</td>
				<td><input style="width:150px"  name="sort" class="input" value="<?=$da['rs']['sort']?>">
				<span style="color:gray">越小越靠前</span>
				</td>
			</tr>
			
			<tr>
				<td height="50" align="right"></td>
				<td><button type="button" onClick="save(this)" style="padding:8px 20px;border-radius:5px" class="webbtn" >保存</button>&nbsp;<span id="msgview"><a href="javascript:;" onclick="js.back()">返回</a></span></td>
			</tr>
			</table>
			</form>
			
			
		</div>
	</div>
</div>



<?php 
include_once(''.P.'/public/footer.html');
?>
</div>

</body>
</html>